package com.rapid.maintenance.ui.activity.machining;

import android.content.Intent;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;

import androidx.recyclerview.widget.RecyclerView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.rapid.maintenance.R;
import com.rapid.maintenance.adapter.DeviceShareListAdapter;
import com.rapid.maintenance.base.BaseActivity;

import butterknife.BindView;

public class DeviceShareListActivity extends BaseActivity {
    @BindView(R.id.et_content)
    EditText etContent;
    @BindView(R.id.bt_search)
    Button btSearch;
    @BindView(R.id.recyclerView)
    RecyclerView recyclerView;
    private DeviceShareListAdapter adapter;
    private String data;

    @Override
    protected int provideRootLayout() {
        return R.layout.activity_device_share_list;
    }

    @Override
    protected void initializationData(Intent intent) {
        data = intent.getStringExtra("data");
        super.initializationData(intent);
    }

    @Override
    protected void init() {
        setTitle("设备共享列表");
        setStatusBarColor(0xFF016DB6);
        setToolBarColor(0xFF016DB6);

        recyclerView.setAdapter(adapter = new DeviceShareListAdapter());
        adapter.addData(new Object());
        adapter.addData(new Object());
        adapter.addData(new Object());
        adapter.addData(new Object());
        adapter.addData(new Object());
        adapter.addData(new Object());
        adapter.addData(new Object());
        adapter.addData(new Object());
        adapter.addData(new Object());
        adapter.addData(new Object());
        adapter.addData(new Object());
        adapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
            @Override
            public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
                startActivity(DeviceShareDetailActivity.class);
            }
        });
        etContent.setText(data);
    }

}
